package com.example.questionnaire.service;

import cn.hutool.json.JSONObject;
import com.example.questionnaire.exception.RException;
import com.example.questionnaire.pojo.DO.AllQuestion;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

public interface QuestionTitleService {
//    boolean updateAddDoubleChoiceQuestion(String formid,
//                                          String title,
//                                          String subjectId,
//                                          boolean isGroup,
//                                          String groupingArray,
//                                          boolean isSort,
//                                          boolean isMustAnswer,
//                                          boolean isWritePrompt,
//                                          String hint,
//                                          String jumpQuestion,
//                                          String optionsOrder,
//                                          String optionArray,
//                                          int maxSelection,
//                                          int minSelection,
//                                          String groupingArray) throws IOException;


    boolean updateAddMultipleChoiceQuestion(String formid,String title,String subjectId,Boolean isMustAnswer,Boolean isWritePrompt,String tipContent,String jumpingType,String questionsJumpItems,String optionsOrder, String optionArray,String groupingArray,Boolean isGroup) throws IOException, InvocationTargetException, IllegalAccessException;

    boolean DeleteQuestion(String formid, String subjectId) throws RException;


    Object getallquestions(String formid);

//    boolean updateAddFillInQuestion(String formid, int subjectId, String subjectName, int mustAnswer, String hint, String attribute, int rowAttribute, int noRepeat, int countMax, int countMin, int jumpQuestion);

    Object jumpquestiontitle(String subjectId);
//    List<Object> getAllInformation(int subjectId);


    boolean updateAddFillInQuestion(String formid, String subjectName, String subjectId, boolean isMustAnswer, boolean isWritePrompt, String tipContent, int multilineText, String attribute, boolean isSpaceConstraints, String maxNum, String minNum, boolean isNotAllowedToRepeat, String questionJumpItems);

    boolean updateAddDoubleChoiceQuestion(String formid, String title, String subjectId, boolean isGroup, boolean isSort, boolean isMustAnswer, boolean isWritePrompt, String tipContent, String questionsJumpItems, String numberOfOptions, String optionArray, int most, int mini, String groupingArray) throws IOException;
    //public String getQuestionsInformation(String formid, String subjectId);
}
